<template>
	<div class="boss">
		<head-page
			:title="`${num}.${title}`"
			style="border-bottom: 2px solid #dad9df"
		></head-page>
		<!-- 版心区域 -->
		<div class="center">
			<div class="coffee" v-for="(item, index) in list" :key="index">
				<div class="title">
					{{ item.father }}
				</div>
				<div class="context">
					<div class="xi" v-for="(v, i) in item.list" :key="i">
						<div class="yuan">
							{{ i + 1 }}
						</div>
						<div
							class="zhong"
							@click="coffeedetails(num, title, index + 1, v)"
						>
							{{ v.name }}
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import { getMineDetail } from "@/api/index"
export default {
	data() {
		return {
			list: "",
			title: this.$route.query.title,
			num: this.$route.query.num,
		}
	},
	methods: {
		coffeedetails(num, title, index, item, toptitle) {
			this.$router.push({
				path: "/sharedetails",
				query: {
					num,
					title,
					index,
					Text: item.name,
					id: item.id,
				},
			})
		},
	},
	mounted() {
		//点击标题查看详情
		getMineDetail({
			// mineTitle: this.$route.query.i
			Id: this.$route.query.id,
		}).then((res) => {
			if (res.data.code == 200) {
				this.list = res.data.data
			}
		})
	},
};
</script>

<style scoped>
.boss {
	width: 100%;
	height: 6.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.center {
	width: 98%;
	height: 100%;
}
.coffee {
	width: 100%;
	font-weight: 700;
}
.title {
	width: 100%;
	height: 0.3rem;
	line-height: 0.3rem;
}
.xi {
	width: 100%;
	margin-top: 0.05rem;
	display: flex;
}
.xi .yuan {
	width: 0.16rem;
	height: 0.16rem;
	margin-left: 0.1rem;
	font-weight: 700;
	text-align: center;
	line-height: 0.16rem;
	border-radius: 50%;
	margin-top: 0.05rem;
	border: 1px solid black;
}

/* 中间区域 */
.zhong {
	width: 95%;
	height: 100%;
	line-height: 0.28rem;
	padding-left: 5px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}
</style>